const express = require('express')
// const mongoose = require('mong0ose')

// const DB_URL=''
// mongoose.connect(DB_URL)
// mongoose.connection.on('connected',function(){
//     console.log('mongo connect success')
// })

const app = express()
// res.send('<h1>aaaa</h1>')返回文本
// res.json('<h1>aaaa</h1>')返回json
// res.sendfile('<h1>aaaa</h1>')返回文件
app.get('/',function(req,res){
    res.send('<h1>aaaa</h1>')
})

app.get('/data',function(req,res){
    res.json({age:18,name:'feifei'})
})
app.listen(9093,function(){
    console.log('Node server start at port 9093')
})